#define _CRT_SECURE_NO_WARNINGS 1



#include "string.h"

//
//int main()
//{
//	My_string::test1();
//	return 0;
//}


namespace MyString
{
	void test6()
	{
		//string s1("hello world");
		//// char ch;

		//string::iterator it = s1.begin();
		//while (it != s1.end())
		//{
		//	cout << *it << " ";
		//}
		//cout << endl;

		//for (auto ch : s1)
		//{
		//	cout << ch << " ";
		//}
		//cout << endl;

		string s1("hello world");
		size_t pos = s1.find(" wo", 2);
		s1.insert(pos, "xxxxx");
		cout << s1 << endl;

		string s2 = s1.substr(5, 5);
		cout << s2 << endl;

		s2 = s1.substr(10);
		cout << s2 << endl;


		string s3 = s1.substr(0, 10);
		cout << s3 << endl;
		/*s1.insert(10, "xxxxxx");
		cout << s1 << endl;


		s1.erase(0, 10);
		cout << s1 << endl;
		s1.erase(5);
		cout << s1 << endl;*/
	}

	void test7()
	{
		//string s1("hello world");
		///*for (size_t i = 0; i < s1.size(); i++)
		//{
		//	++s1[i];
		//}
		//cout << s1 << endl;*/
		//string s2 = s1;
		//cout << s2 << endl;

		string s1;
		cin >> s1;
		cout << s1 << endl;
	}
}

//int main()
//{
//	MyString::test7();
//	return 0;
//}


int main()
{
	string s1;
	cout << sizeof(s1) << endl;
	string s2("123");
	cout << sizeof(s2) << endl;

	string s3("111111111111111111111111111111");
	
	return 0;
}